﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using WpfApp7.Command;

namespace WpfApp7.ViewModels
{
    public class MultiCommandParamViewModel: ObservableObject
    {
        public PdyCommand<CommandParamInput> MultiParamCommand { get; set; }
        public MultiCommandParamViewModel()
        {
            MultiParamCommand = new PdyCommand<CommandParamInput>(p =>
            {
                _ = MessageBox.Show("Id:" + p.Id + " Name:" + p.Name);
            });
        }
    }

    //声明多个参数的类型
    public class CommandParamInput
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
}
